home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-06-19 | 1.4 KB | 48 lines |
- package symantec.itools.awt;
-
- import java.awt.Color;
- import java.awt.Graphics;
- import java.awt.Polygon;
-
- /**
- * This component groups the two spin buttons horizontally. It is used for
- * spinners with the ORIENTATION_HORIZONTAL attribute set.
- * @see Spinner
- * @see Orientation
- * @version 1.0, Nov 26, 1996
- * @author Symantec
- */
-
- public class HorizontalSpinButtonPanel
- extends SpinButtonPanel
- {
- /**
- * Constructs the default HorizontalSpinButtonPanel.
- */
- public HorizontalSpinButtonPanel()
- {
- resize(32, 16);
- }
-
- /**
- * Moves and/or resizes this component.
- * This is a standard Java AWT method which gets called to move and/or
- * resize this component. Components that are in containers with layout
- * managers should not call this method, but rely on the layout manager
- * instead.
- * It is reshapes the two direction buttons so they both fit within the
- * panels new shape.
- *
- * @param x horizontal position in the parent's coordinate space
- * @param y vertical position in the parent's coordinate space
- * @param width the new width
- * @param height the new height
- */
- public void reshape(int x, int y, int width, int height)
- {
- incButton.reshape(width / 2, 0, width / 2, height);
- decButton.reshape(0, 0, width / 2, height);
-
- super.reshape(x, y, width, height);
- }
- }